var  REST_CONFIG = {
	VCODE:"/api/auth/code",   //获取图片验证码
	LOGIN:'/api/auth/login',  //登录
	LOGOUT:"/api/Auth/LogOut",   //退出

	//用户相关接口
	GETUSERINFO:"/api/Auth/GetUserInfo",  //获取用户信息
	GETUSETLIST:"/api/Users/Query",//获取用户列表
	CREATEUSER:"/api/Users/Create", //创建用户
	UPDATEUSER:"/api/Users/Update", //创建用户
	SETUSERENABLE:"/api/Users/Enable",  //设置用户是否可用
    GETUSERMODEL:"/api/Users/Get",  //获取用户信息
    CHECKPASSWORD:"/api/Auth/CheckPassword", //验证密码输入是否正确
    UPDATEPASSWORD:"/api/UserCenter/UpdatePassword",//修改用户密码
    UPDATECURRENTINFO:"/api/UserCenter/Update",//修改个人资料
    UPLOADAVATAR:"/api/UserCenter/AvatarUpload", //上传头像
    RESETPASSWORD:"/api/Users/ResetPassword", //重置密码
    GETONLINEYSER:"/api/Online/Query",//在线用户查询
    DELETEONLINEYSER:"/api/Online/Delete",//踢出在线用户

    //角色相关接口
    GETROLELIST:"/api/Roles/Query",  //查询角色列表
    GETROLEMODEL:"/api/Roles/GET",   //查询角色model
    CREATEROLE:"/api/Roles/Create",  //添加角色
    UPDATEROLE:"/api/Roles/Update",  //修改角色
    DELETEROLE:"/api/Roles/Delete" ,  //删除角色
    
    //角色权限
    GETPOWERSGROUP:"/api/RolePowers/GetPowersGroup",  //按分组汇总查询权限
    GETROLEPOWERS:"/api/RolePowers/GetRolePowers",    //查询角色权限
    UPDATEROLEPOWERS:"/api/RolePowers/UpdateRolePowers",  //更新角色权限

    //用户角色相关接口
    GETROLEUSERS:"/api/RoleUsers/Get", //查询用户角色
    ADDROLESUSER:"/api/RoleUsers/Create",  //添加用户角色
    DELETEROLEUSER:"/api/RoleUsers/Delete", //删除角色用户
    GETEXCLUDEUSER:"/api/RoleUsers/GetExcludeUsers", //查询未加入到某个角色下用户列表

    //菜单相关接口
    GETMENULIST:"/api/Menus/Query",//查询菜单列表
    GETMENULISTNOAUTH:"/api/Menus/QueryNoAuth",//查询菜单列表
    GETMENU:"/api/Menus/Get",  //查询菜单
    CREATEMENU:"/api/Menus/Create",  //添加菜单
    UPDATEMENU:"/api/Menus/Update",  //更新菜单
    DELETEMENU:"/api/Menus/Delete",  //删除菜单
    GETUSERMENUS:"/api/Menus/GetUserMenus", // 获取用户菜单

    //权限相关
    GETPOWERLIST:"/api/Powers/Query", //查询权限列表
    GETPOWERS:"/api/Powers/Get", //获取权限实体
    CREATEPOWERS:"/api/Powers/Create", //添加权限定义
    UPDATEPOWERS:"/api/Powers/Update", //修改权限定义
    DELETEPOWERS:"/api/Powers/Delete", //删除权限定义

    //字典相关接口
    GETDICTIONARYLIST:"/api/Dictionary/Query",//查询字典列表
    GETDICTIONARY:"/api/Dictionary/Get",  //查询字典
    CREATEDICTIONARY:"/api/Dictionary/Create",  //添加字典
    UPDATEDICTIONARY:"/api/Dictionary/Update",  //更新字典
    DELETEDICTIONARY:"/api/Dictionary/Delete",  //删除字典

    //组织架构相关接口
    GETDEPARTMENTLIST:"/api/Department/Query",//查询字典列表
    GETDEPARTMENT:"/api/Department/Get",  //查询字典
    CREATEDEPARTMENT:"/api/Department/Create",  //添加字典
    UPDATEDEPARTMENT:"/api/Department/Update",  //更新字典
    DELETEDEPARTMENT:"/api/Department/Delete",  //删除字典

    //组织结构下用户相关接口
    GETUSERDEPARTMENTLIST:"/api/UserDepartment/GetUserDepartment",// 获取部门下用户列表
    GETEXCLUDEUSERINDEPARTMENT:"/api/UserDepartment/GetExcludeUsers",  //获取指定部门下未添加用户列表
    UPDATEUSERDEPARTMENT:"/api/UserDepartment/UpdateUserDepartment",   //更新部门用户


}

var serverPath = "http://127.0.0.1:10001";
//var  serverPath = "http://localhost:44397";
function getServerPath(key){
	var apiUrl = REST_CONFIG[key.toUpperCase()];
    if (apiUrl == "") {
        mui.toast("获取服务器接口失败，请重新执行!");
        return "";
    }
    return serverPath + apiUrl;
}
